<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>Demo1</title>
    <!-- 导入echarts核心库 -->
    <script src="https://cdn.bootcss.com/echarts/4.7.0/echarts.min.js"></script>
    <script src="../../assets/js/jquery-1.8.2.min.js"></script>

</head>
<body>
<!-- 创建报表显示区域 -->
<div id="main" style="width: 600px;height:400px;"></div>

<!-- JS动态渲染报表 -->
<script type="text/javascript">
    $.get("/emp/getMap", {}, function (data) {
        //1.创建报表对象
        var myChart = echarts.init(document.getElementById('main'));

        //2.准备报表样式和数据
        var option = {
            title: {
                text: 'ECharts 入门示例'
            },
            tooltip: {},
            legend: {
                data: ['销量']
            },
            xAxis: {
                data: ["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"]
            },
            yAxis: {},
            series: [{
                name: '销量',
                type: 'bar',
                data: [5, 20, 36, 10, 10, 100]
            }]
        };
    });

    //3.绑定数据并且渲染
    myChart.setOption(option);
</script>
</body>
</html>
